package com.fqg.weblucene.lucene;

import com.fqg.weblucene.lucene.utils.LuceneUtils;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by fqg05007 on 2021/8/29.
 */
public class Lucene880V extends AbstractLucene {
    private List<String> allIndexs=null;
    public List<String> getsAllIndex() {
        try {
            if(allIndexs!=null){
                return allIndexs;
            }
            return LuceneUtils.getAllIndex();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    public List<HashMap<String,String>>  AllIndexsAndValues() {

        try {
            return LuceneUtils.getAllIndexValues();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public List<HashMap<String, String>> searchByCondition(Map<String, String> searchKeys) {
        try {
            return LuceneUtils.searchByCondition(searchKeys);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public String version() {
        return "8.8.0";
    }
}
